package com.demo.boot.web.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.demo.api.UserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {

    @Reference
    private UserService userService;

    @RequestMapping("/list")
    public List<String> list(){
        return userService.listNames();
    }
}
